package com.wxy.demo.security;

import java.util.Base64;

/**
 * <p>
 * base64加密解密
 * </p>
 *
 * @author e-Xiaoyuan.Wang
 * @since 2023/1/5 11:01
 */
public class Base64Demo {
    public static void main(String[] args) {
        String encrypt = new String(Base64.getEncoder().encode("123".getBytes()));
        System.out.println(encrypt);
        String decrypt = new String(Base64.getDecoder().decode(encrypt));
        System.out.println(decrypt);
    }
}
